import { post, get, del, patch } from '@/request/request'
import type { AddReq, EditReq, DelReq } from '@fast-crud/fast-crud'
export const addRequest = ({ form }: AddReq) => post('/api/stock', form)
export const delRequest = ({ row }: DelReq) => del(`/api/stock/${row.id}`)
export const editRequest = ({ form, row }: EditReq) => patch(`/api/user/${row.id}`, form)
export const pageRequest = (data: any) => get('/api/stock', data)
